package com.generic.test02.demo01;

/**
 * 定义一个泛型类实现实例化某个类的对象
 * @author bin
 * @date 2025 - 03 -26
 **/
public class NoClass{
    public static  <T> T create(Class<T> beanClass)   {
        try {
            return beanClass.getConstructor().newInstance();
        } catch (Exception e) {
            throw new RuntimeException("实例化失败",e);
        }
    }
}
